def X3(*x,base=3):
    sum=0
    for i in x:
        sum += i
    if x[-1] == 5:
        base = 5
        sum -=5
        result = sum * base
    else :
        result = sum * base
    return result
print(X3(3,3,5))
